package com.hnkywl.sts.dao.htdygl;

import com.hnkywl.sts.entity.htgl.Htdy;
import net.ruixin.orm.hibernate.Page;
import net.ruixin.orm.hibernate.SimpleHibernateTemplate;
import org.springframework.stereotype.Repository;

/**
 * Created with IntelliJ IDEA.
 * User: nianjunyan
 * Date: 13-4-11
 * Time: 上午11:46
 * To change this template use File | Settings | File Templates.
 */
@Repository
public class HtdyDao extends SimpleHibernateTemplate<Htdy, Long> {

    /**
     * 分页查询全部合同定义
     *
     * @param pageNo
     * @param pageSize
     * @return
     */
    public Page<Htdy> findHtdyList(int pageNo, int pageSize) {
        Page<Htdy> page = new Page<Htdy>();
        page.setAutoCount(true);
        page.setPageNo(pageNo);
        page.setPageSize(pageSize);
        page.setOrder("desc");
        page.setOrderBy("lastUpdated");
        return this.findAll(page);
    }
}
